package com.bwie.controller;
import com.bwie.pojo.Prod;
import com.bwie.pojo.ProdAtta;
import com.bwie.service.ProdService;
import com.bwie.service.impl.ProdServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* 商品表(tb_prod)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/brand/prod")
public class ProdController {
/**
* 服务对象
*/
    @Autowired
    private ProdService prodService;

    @ApiOperation("商品列表")
    @PostMapping("/prodList")
    public R prodList(@RequestBody PageInfoVo pageInfoVo){
        return prodService.prodList(pageInfoVo);
    }

    @ApiOperation("添加列表")
    @PostMapping("/addProdList")
    public R addProdList(@RequestBody Prod prod){
        return prodService.addProdList(prod);
    }

    @ApiOperation("商品附件")
    @PostMapping("/addProdAtta")
    public R addProdAtta(@RequestBody ProdAtta prodAtta){
        return prodService.addProdAtta(prodAtta);
    }

}
